#pragma once
/*************************************************/
// Heavy referance to SGD project
/*************************************************/
#include "Animation.h"
#include "../source/Player.h"
#include "AnimInstance.h"
#include "../stdafx.h"
#include "../SGD Wrappers/Entity.h"


class CAnimationManager
{
public:

	static CAnimationManager* GetInstance(void);
	static void DeleteInstance(void);

	bool Initialize();
	void LoadXmlFile(const char * fileName);

	/**********************************************************/
	// Entity Storage:
	void	AddAnimation(CAnimation* pAnimation, std::string key);
	void	RemoveAll(void);

	/**********************************************************/
	// Animation Upkeep: 
	void UpdateAll(float elapsedTime);
	void RenderAll(void);

	void	CheckCollisions(unsigned int bucket1, unsigned int bucket2);
	void SetOwner(Entity* owner, std::string key);

	void AddAnim(CAnimation* anim2Play);
	


private:

	/**********************************************************/
	// Not a singleton, but still don't want the Trilogy-of-Evil
	CAnimationManager(const CAnimationManager&) = delete;
	CAnimationManager& operator= (const CAnimationManager&) = delete;

	/**********************************************************/
	static CAnimationManager* s_Instance;

	CAnimationManager(void) = default;
	virtual ~CAnimationManager(void) = default;

	

	
	std::map< std::string, CAnimation* >	AnimationMap;


	/**********************************************************/
	// members:		
	bool		m_bIterating = false;	

	std::vector<CAnimation*> currAnim;
	

};

